//
//  YZGTableViewController.m
//  sisitv
//
//  Created by apple on 16/9/19.
//  Copyright © 2016年 JLXXYZG. All rights reserved.
//

#import "YZGTableViewController.h"

@interface YZGTableViewController ()
@end

@implementation YZGTableViewController



- (void)viewDidLoad {
    [super viewDidLoad];
    [self createDataSource];
    [self creatTableView];
}

-(void)creatTableView{
    CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;
    CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;
    CGFloat tabBarHeight =  self.tabBarController.tabBar.bounds.size.height;
	CGFloat statusBar = [[UIApplication sharedApplication] statusBarFrame].size.height;
	CGFloat navBarHeight = 44.0;
    CGFloat height = screenHeight - statusBar- navBarHeight -tabBarHeight;
    self.tableView = [[YZGTableView alloc]initWithFrame:CGRectMake(0, 0,screenWidth, height) style:UITableViewStylePlain];
    self.tableView.yzgDelegate = self;
    self.tableView.yzgDataSource = self.dataSource;
    [self.view addSubview:self.tableView];
}

-(void)createDataSource{
    NSAssert(NO, @"You Must implement This Mehtod ---%@---- %@",NSStringFromClass([self class]),NSStringFromSelector(_cmd));
}

-(void)dealloc{
    self.tableView.yzgDelegate = nil;
    self.tableView.yzgDataSource = nil;
}

@end
